package com.nenude.corejava.ch7.newhomework2;

public class ComputerStudent extends Student {
	private double operating;
	private double writing;

	public ComputerStudent(int studentid, String name, String sex, int age,
			double midterGrade, double finalExamGrade, double operating,
			double writing) {
		super(studentid, name, sex, age, midterGrade, finalExamGrade);

		this.operating = operating;
		this.writing = writing;
	}

	public ComputerStudent() {
	}

	@Override
	public double gradeAssessing() {
		double grade = operating * 0.4
				+ (writing + getMidterGrade() + getFinalExamGrade()) * 0.2;

		return grade;
	}

}
